package oop;

public class SilverCard extends Card{
    public SilverCard(String name, String carNumber, String phone, double money) {
        super(name, carNumber, phone, money);
    }

    @Override
    public void consumeMoney(double money) {
        System.out.println("您的消费金额为：" + money);
        System.out.println("打折后的消费金额为：" + money * 0.9);
        if (money* 0.9 >= getMoney()){
            System.out.println("您的余额不足，请充值");
            return;
        }
        // 更新金卡的余额
        setMoney(getMoney() - money * 0.9);
    }
}
